﻿@model App.Web.ViewModels.PagerViewModel
    @if (Model.PageCount > 1)
    {
        <nav class="text-center">
            <ul class="pagination">
                <li class="@(Model.PageIndex == 1 ?"disabled":"")">
                    <a href="/exchange/orders?page=@(Model.PageIndex-1)" aria-label="Previous">
                        <span aria-hidden="true">&laquo;</span>
                    </a>
                </li>
                @for (int i = 1; i <= Model.PageCount; i++)
                {
                    <li class="@(Model.PageIndex == i ? "active" : "")"><a href="/exchange/orders?page=@i">@i</a></li>
                }
                <li class="@(Model.PageIndex == Model.PageCount ?"disabled":"")">
                    <a href="/exchange/orders?page=@(Model.PageIndex+1)" aria-label="Next">
                        <span aria-hidden="true">&raquo;</span>
                    </a>
                </li>
            </ul>
        </nav>
    }

